<%@ page language="java" pageEncoding="UTF-8" %>
<%@ include file="/pages/common/taglibs.jsp" %>

<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<%
	String current_viewer = (String)request.getAttribute("CURRENT_VIEWER");
	if(current_viewer == null) current_viewer = "PIE";
%>
<html>
  <head>
  	<title>统计结果 - ${questionName }</title>
	<%@ include file="/pages/common/meta.jsp" %>
	<link rel="stylesheet" type="text/css" href="${ctx }/styles/charts.css"/>
	<script language="Javascript" src="${ctx }/FusionCharts/FusionCharts.js"></script>
  </head>
  <body>
  	<div class="chart-type-bar">
        <ul>
            <li <%= current_viewer.equals("PIE") ? "class='liSelect'" : "" %>><a class="chart-pie" id="chart_pie" href="${ctx }/chart.htm?method=simple&viewer=PIE&questionId=${param['questionId']}">饼状图</a></li>
            <li <%= current_viewer.equals("COLUMN") ? "class='liSelect'" : "" %>><a class="chart-column" id="chart_column" href="${ctx }/chart.htm?method=simple&viewer=COLUMN&questionId=${param['questionId']}">柱状图</a></li>
            <li <%= current_viewer.equals("CURVE") ? "class='liSelect'" : "" %>><a class="chart-curve" id="chart_curve" href="${ctx }/chart.htm?method=simple&viewer=CURVE&questionId=${param['questionId']}">折线图</a></li>
            <li <%= current_viewer.equals("BAR") ? "class='liSelect'" : "" %>><a class="chart-bar" id="chart_bar" href="${ctx }/chart.htm?method=simple&viewer=BAR&questionId=${param['questionId']}">条形图</a></li>
        </ul>
    </div>
    <c:if test="${not empty strXML}">
    <div style="border: 1px solid;width:600px;">
		<jsp:include page="../FusionCharts/FusionChartsRenderer.jsp" flush="true"> 
			<jsp:param name="chartSWF" value="${ctx }/FusionCharts/${viewer }" /> 
			<jsp:param name="strURL" value="" /> 
			<jsp:param name="strXML" value="${strXML }" /> 
			<jsp:param name="chartId" value="simple_chart" /> 
			<jsp:param name="chartWidth" value="600" /> 
			<jsp:param name="chartHeight" value="350" /> 
			<jsp:param name="debugMode" value="false" /> 	
			<jsp:param name="registerWithJS" value="false" /> 								
		</jsp:include>
	</div>
	</c:if>
  </body>
</html>